package cn.itcast.usermanage.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("page")

public class PageController {
	@RequestMapping("{pageName}")
	// 通过PathVariable获取用户输入的路径，把路径直接作为视图名称返回。用户输入的必须是正确的视图名称
	public String toPage(@PathVariable("pageName") String pageName){
		return pageName;
	}

}
